package cn.edu.scau.dormitory_management_system.module.examine.service.impl;

import cn.edu.scau.dormitory_management_system.module.examine.dao.CheckoutAuditDao;
import cn.edu.scau.dormitory_management_system.module.examine.entity.CheckoutAuditEntity;
import cn.edu.scau.dormitory_management_system.module.examine.entity.VO.CheckoutAuditVO;
import cn.edu.scau.dormitory_management_system.module.examine.service.CheckoutAuditService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：Vizzk
 * @description：TODO
 * @date ：2021/8/19 15:56
 */
@Service("checkoutService")
public class CheckoutAuditServiceImpl extends ServiceImpl<CheckoutAuditDao, CheckoutAuditEntity> implements CheckoutAuditService {
    @Override
    public boolean insertCheckoutAudit(CheckoutAuditEntity auditEntity) {
        return this.baseMapper.insert(auditEntity)>0;
    }

    @Override
    public List<CheckoutAuditVO> listAuditVOByCheckoutId(Integer checkoutId) {
        return this.baseMapper.listAuditVOByCheckoutId(checkoutId);
    }

    @Override
    public boolean deleteByCheckoutId(Integer id) {
        return this.baseMapper.deleteByCheckoutId(id);
    }
}
